package com.net.lnk.batch.bank.batch;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;

public class BankcardImportJobListener implements JobExecutionListener {

	private long startTime;
	private long endTime;

	public void beforeJob(JobExecution ctx) {
		startTime = System.currentTimeMillis();
		System.out.println("开始任务处理");
	}

	public void afterJob(JobExecution ctx) {
		endTime = System.currentTimeMillis();
		System.out.println("任务处理结束");
		System.out.println("任务耗时：" + (endTime - startTime) + " ms");
	}

}
